package interfaces.app;

import exceptions.StreamException;

/**
 * Analyze a command from shell.
 * <br/>
 * Created: 11.10.11
 *
 * @author Martin Štulc (<a href="mailto:martin.stulc@gmail.com">martin.stulc@gmail.com</a>)
 * @version 1.0
 */
public interface IAnalyzer
{
    /**
     * Set command for analyzing.
     *
     * @param command the command
     */
    void setCommand(final String command);

    /**
     * Set base path for relative paths
     *
     * @param path the path
     */
    void setBasePath(final String path);

    /**
     * Return a stream for output.
     *
     * @return the output stream
     * @throws StreamException if stream is not usable
     */
    IStream getOutput() throws StreamException;

    /**
     * Return a stream for error output.
     *
     * @return the error output stream
     * @throws StreamException if stream is not usable
     */
    IStream getErrorOutput() throws StreamException;

    /**
     * Return a stream for input.
     *
     * @return the input stream
     * @throws StreamException if stream is not usable
     */
    IStream getInput() throws StreamException;

    /**
     * Return command name.
     *
     * @return the command name
     */
    String getCommandName();

    /**
     * Return an array of arguments.
     *
     * @return the array of arguments
     */
    String[] getArguments();
}
